#ifndef POKER_H
#define POKER_H

#include <QWidget>
#include <QLabel>
#include <QPixmap>
#include <QSize>
#include <QEvent>
#include <QMouseEvent>
class Poker : public QWidget
{
    Q_OBJECT


public:
    explicit Poker(QWidget *parent = nullptr,int index_v = 0,QSize size = QSize(105,150),int len_v = 20);
    void setCanClick(bool);
    bool getCanClick() const;
    void reset_Pixmap(int index_v);
    int getIndex() const;
    void clicked_my();
    bool getIsUp() const;
signals:
    void pos_changed(bool isUp,Poker * poker);

protected:
    //bool event(QEvent * event);
    virtual void mousePressEvent(QMouseEvent * event);

private:
    int index;
    QLabel *label;
    QPixmap pix;
    bool isUp;
    int len;
    bool canClick;
};

#endif // POKER_H
